#! /usr/bin/env python

# this script used to replace 'N' of a fastafile into ''


def quN(file, file2):
    f = open(file,'r')
    lists = f.readlines()
    for i in range(1,len(lists),2):
        lists[i]=lists[i].replace('N','')
    f2 = open(file2,'w')
    for i in lists:
        print >>f2, i,
    f.close()
    f2.close()


if __name__ == '__main__':
    import os,sys
    if len(sys.argv) ==1:
        print "usage:python quN.py fastafile outfile"
    else:
        quN(sys.argv[1], sys.argv[2])
        
